#include <stdio.h>
#include <string.h>
#include <stdlib.h>
typedef struct
{
	int count;
	int *pos;
} Posfound;
Posfound strfind(char* p1,char* p2)
{
	Posfound pf={0};
	pf.pos=(int*)malloc(1000*sizeof(int));
	if(pf.pos==NULL)
	{
		return pf;
	}
	//find
	int cnt=0;
	char* ptr=p1;
	int len=strlen(p2);
	while(*ptr)
	{
		if(strncmp(ptr,p2,len)==0)
		{
			pf.count++;
			pf.pos[cnt++]=ptr-p1;
		}
		ptr++;
	}
  return pf;	
}
int main()
{
	char str[101];
	fgets(str,101,stdin);
	str[strcspn(str,"\n")]=='\0';
	char word[100];
	fgets(word,100,stdin);
	word[strcspn(word,"\n")]=='\0';
	Posfound pf=strfind(str,word);
	printf("%d %d",pf.count,pf.pos);
	free(pf.pos);
	return 0;
}
